export interface ExecutionRecord {
  id: string;
  taskId: string;
  taskTitle: string;
  taskGuide: string;
  status: 'success' | 'error' | 'waiting';
  createdAt: Date;
  duration: string;
  category: string;
  error?: string;
  logs: LogEntry[];
  screenshot?: string;
  outputFiles?: OutputFile[];
}

export interface LogEntry {
  createdAt: string;
  message: string;
}

export interface OutputFile {
  id: string;
  name: string;
  type: string;
  size: number;
}

export interface FilterOptions {
  status: 'all' | 'success' | 'error' | 'waiting';
  dateRange: 'all' | 'today' | 'this-week' | 'this-month';
  sortOrder: 'newest' | 'oldest';
}

export interface ExecutionHistoryProps {
  records: ExecutionRecord[];
  onDelete: (ids: string[]) => void;
  onRerun: (id: string) => void;
}

export interface SearchFilterProps {
  filterOptions: FilterOptions;
  setFilterOptions: (options: FilterOptions) => void;
  searchQuery: string;
  setSearchQuery: (query: string) => void;
  viewMode: 'table' | 'cards';
  setViewMode: (mode: 'table' | 'cards') => void;
  selectedIds: string[];
  onDeleteSelected: () => void;
}

export interface RecordListProps {
  records: ExecutionRecord[];
  viewMode: 'table' | 'cards';
  selectedIds: string[];
  setSelectedIds: (ids: string[]) => void;
  onViewDetails: (record: ExecutionRecord) => void;
  onDelete: (id: string) => void;
  onRerun: (id: string) => void;
}

export interface DetailDialogProps {
  record: ExecutionRecord | null;
  open: boolean;
  onClose: () => void;
  onRerun: (id: string) => void;
  onDownload: (taskId: string, fileName: string) => void;
} 